from models.base import BaseModel, db


class Dictionary(BaseModel):
    __tablename__ = 'dictionary'
    __table_args__ = {'comment': '字典表模型'}

    code = db.Column(db.String(255), primary_key=True, comment='编码')
    name = db.Column(db.String(255), nullable=False, comment='名称')
    can_new = db.Column(db.Boolean, nullable=False, comment='是否可以新增')
    parent_dic = db.Column(db.String(255), nullable=False, comment='父级')
